import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)



const store = new Vuex.Store({
	// 下面这些值仅为示例，使用过程中请删除
	state: {
		projectShow: false,
		scheduleShow: false,
		dataShow: false,
		qualityShow: false,
		newsShow: false,
		newsDetailShow: false,
		newsDetails: 0,
		personnelShow: false,
		safetyShow: false,
		ThreeMonths: [],
		tableData: [],
		scheduleIndex: 0,
		threeLevelShow: false,
		threeLevel: {},
		scheduleList: [],



	},
	mutations: {
		change(state, contObj) {
			//通过传入的变量去改变对应的全局变量
			let str = contObj.str;
			let cont = contObj.cont;
			state[str] = cont;
		},
	},
	actions: {
		changeFun: function(context, obj) {
			context.commit('change', obj)
		}
	}
})

export default store
